﻿using NFit.Core.Interfaces;

namespace NFit.Core
{
    /// <summary>
    /// Default implementation for execution context
    /// </summary>
    public class DefaultExecutionContext : IExecutionContext
    {
        /// <summary>
        /// Catalog of specs and fixtures implementations
        /// </summary>
        public IFixtureCatalog Catalog { get; set; }

        private ExecutionSummary _summary = new ExecutionSummary();

        /// <summary>
        /// Summary of the execution result
        /// </summary>
        public ExecutionSummary Summary
        {
            get { return _summary; }  
            set { _summary = value; }
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="catalog"></param>
        /// <param name="provider"></param>
        public DefaultExecutionContext(IFixtureCatalog catalog, INameProvider provider)
        {
            //SummarizeErrors = true;
            NameProvider = provider;
            Catalog = catalog;
        }

        /// <summary>
        /// Name provider for the resolution of the names
        /// </summary>
        public INameProvider NameProvider { get; set; }

        

                
    }
}
